package com.ubaer.zsycz.components.exception;

import android.content.Context;
import android.text.TextUtils;

import com.lsw.util.ToastUtil;

import java.net.SocketTimeoutException;

/**
 * author：lsw
 */
public class ExceptionMsgUtil {

    public static void hintMsg(Context context, Throwable e){
        if(e instanceof SocketTimeoutException){
            ToastUtil.showToast(context,"网络繁忙，请重试！");
        }else if(e instanceof NoNetworkException){
            if(!TextUtils.isEmpty(e.getMessage())){
                ToastUtil.showToast(context,e.getMessage());
            }
        }
    }
}
